{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}

<style>
	/*-------------资金总览------------------*/
	.summary {margin:50px 10px; background: #fff;border: 1px solid #e5e5e5;border-radius: 4px;}
	.summary .btn-default {display: inline-block;  width: 70px; height: 30px; margin-bottom: 15px; font-size: 14px; text-align: center; vertical-align: middle; cursor: pointer; border-radius: 4px; border-width: 1px; border-style: solid; /* color: #338bf1;  */background-color: #fff; border-color: #e5e5e5; text-decoration: none;}
	.summary .btn-default:focus, .btn-default:hover { background-color: #f0f0f0; border-color: #dddddd; }

	.summary strong { font-size: 30px;color: #338bf1; }

	.summary dl { position: relative;float: left;margin: 10px 0;padding:35px 0 0 4%;height: 200px; width: 230px; border-right: 1px dashed #dbdbdb; }
	.summary .circle:before,
	.summary .circle:after {content: "";position: absolute;right:-8px;width: 15px;height: 15px;background: #fff;border: 1px solid #e5e5e5;border-radius: 100%;border-top-color: transparent;border-right-color: transparent;  }
	.summary .circle:before {top:-19px;
		-webkit-transform:rotate(-45deg);
		   -moz-transform:rotate(-45deg);
		        transform:rotate(-45deg);
	}
	.summary .circle:after {bottom: -19px;
		-webkit-transform:rotate(135deg);
		   -moz-transform:rotate(135deg);
			    transform:rotate(135deg);
	}
	.summary dl dt { margin-bottom: 8px; font-size: 14px;font-weight:normal;color: #666;}
	.summary dl dd { margin-bottom: 12px; line-height: 1em;}
	.summary dl .money {font-size: 30px; font-weight: bold; }
	.summary dl.dl4 { border: none; }
	.summary dl.dl1 {width: 31%;}
	.summary dl.dl2 {width: 21%;}
	.summary dl.dl3 {width: 18%;}
	.summary dl.dl4 {width: 30%;}

	.summary .dl1 {padding-left: 0;}
	.summary .dl1 .wrap {width: 200px;margin: 0 auto;}
	.summary .dl1 .wrap img{margin-bottom: 15px;border: 1px solid #e5e5e5;}
	.summary .dl1 .wrap p {margin-bottom: 20px;}
	.summary .dl4 .bank{display: inline-block;padding: 8px 15px;border-radius: 20px;background: #e5e5e5;color: #666;}

	.header2 { position: relative; margin-bottom: 40px;  }
	.header2 h2 { font-size: 18px;color: #666; }
	.layui-layer-page .layui-layer-content{
		position: relative;
		padding: 20px;
		line-height: 24px;
		word-break: break-all;
		overflow: hidden;
		font-size: 14px;
		overflow-x: hidden;
c
	
	/* .link2 { color: #338bf1;color: #1dc574;} */
	/* .link2:hover, .link2:active { color: #0e65ca; } */

</style>
<div class="container-fluid content-body">
	<div class="main">
		<section class="left-section">
			<dl id="leftNav" data-type="fund">
				<dt><i class="glyphicon glyphicon-usd"></i> 资金管理</dt>
				{if in_case_array('admin/fund',$priv) || empty($priv)}
				<dd><a class="mb active" href="{url /admin/fund/index}">资金总览</a></dd>
				{/if}{if in_case_array('admin/fund/log',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/fund/log}">资金流水</a></dd>
				{/if}
			</dl>
		</section>



		<!-- main content start-->
		<section class="right-section" id="right-section">
			{include admin.inc.bread}
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<!-- page breadcrumb start-->
				<!-- {include admin.inc.bread} -->
				<!-- page "breadcrumb end-->
				<!-- Nav tabs -->
				<!-- <ul class="nav nav-tabs">
				
					<li><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 添加订单</a></li>
					<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-th-list"></i> 资金总览</a></li>
					<li><a href="/admin/index/edit"><i class="glyphicon glyphicon-edit"></i> 编辑订单</a></li>
				
				</ul> -->
				<div class="inner-container">
					<div class="summary clearfix">
						<dl class="dl1 circle">
							<dd>
								<div class="wrap mcl">
									<!--<img src="/res/mpe/img/logo.png">-->
									<p>大塑账户：<?php echo substr_replace($userInfo[username],'***',3,5)?></p>
									{if in_array('admin/fund/tradepass',$priv) || empty($priv)}

									<a href="javascript:;" class="link2" data-act="deal_pass">修改交易密码</a>
								    {/if}
								</div>
							</dd>
						</dl>
						<dl class="dl2 circle">
							<dt>
								冻结金额
								<i class="icon_tip down" data-act="tooltipcol" data-text="指未完成订单的冻结款,买家确定订单后系统自动释放至可用余额"></i>
							</dt>
							<dd class="money mc">￥{$userInfo[out_frozen]}</dd>
						</dl>
						<dl class="dl3 circle">
							<dt>可用资金</dt>
							<dd class="money mc" id="js_useable" data-val="{$userInfo[usable]}">￥{$userInfo[usable]}</dd>
							<dd class="mcl">
								{if in_array('admin/fund/inpay',$priv) || empty($priv)}

								<a href="javascript:;" class="btn-default mch btn-sm" data-act="moneyIn">入金</a>
								{/if}
								{if in_array('admin/fund/outpay',$priv) || empty($priv)}

								<a href="javascript:;" class="btn-default mch btn-sm" data-act="moneyOut">出金</a>

								{/if}
							</dd>
						</dl>
						<dl class="dl4">
							<dt>附属账户余额</dt>
							<dd class="money mc">￥{$balance}</dd>
							<dd class="mcl">
								<!--<a href="javascript:;" class="btn-default mcl mch btn-sm" data-act="charge">充值</a>-->
								{if in_array('admin/fund/recharge',$priv) || empty($priv)}
								<span id="chargeWrap" data-class="btn-default mch btn-sm"></span>

								{/if}
                                <span id="chargeWrap" data-class="btn-default mch btn-sm"></span>
								{if in_array('admin/fund/withdraw',$priv) || empty($priv)}

								<a href="javascript:;" class="btn-default btn-sm mch" data-act="withdraw">提现</a>
                                {/if}
								<p class="bank">广发银行  附属账户：{$userInfo[virtual_account]}</p>
							</dd>
						</dl>
					</div>
					<div class="header2 mcl">
						<a href="{url /admin/fund/log}" class="link2 pull-right">更多 >></a>
						<h2 class="header">资金流水</h2>
					</div>
					<form id="J_List_Form">
						<div class="table-responsive">
							<table id="J_ListTable" class="table  table-hover  table-striped">
								<!--tmpl-listtable-->

								<!-- listblock -->
								<thead>
								<tr>
									<th width="20">
										<label class="css-checkbox"><input type="checkbox" class="check-all" /><span></span></label></th>
									<th>流水号</th>
									<!--<th>租户标识</th>-->
									<th>大塑账户</th>
									<th>发生额(￥)</th>
									<th>可用资金(￥)</th>
									<th>资金类型</th>
									<th>业务类型</th>
									<th>具体业务</th>
									<th>交易时间</th>
								</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td style="text-align:center;" colspan="14" class="empty-table-td">{$emptyRecord}</td>
								</tr>
								{/if}
								{loop $items $v}
								<tr>
									<td><label class="css-checkbox"><input type="checkbox" name="ids[]" value="{$v[id]}"/><span></span></label>
									</td>
									<!--tmpl-fieldlist-->

									<td>{$v[serial_no]}</td>
									<!--<td>{$v[mpe_name]}</td>-->
									<td>{$v[username]}</td>
									<td>{$v[amount]}</td>
									<td>{$v[usable]}</td>
									<td>
										{if $v[atype] == '+'}
										<span class="label label-success">收入</span>
										{elseif $v[atype] == '-'}
										<span class="label label-danger">支出</span>
										{else}
										---
										{/if}
									</td>
									<td>{$v[type_name]}</td>
									<td>{if $v[type]=='pay' || $v[type]=='confirm'}订单号：{$v[order_no]}{else}-{/if}</td>
									<td>{$v[addtime]}</td>
								</tr>
								{/loop}


							</table>

						</div>

					</form>
				</div>
			</div>
		</section>
	</div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->

<!--tmpl-script-->

<!-- 账户安全页面-交易密码-设置按钮和修改按钮   弹窗-->
<script type="text/html" id="dealValid">
	<form class="formLayer"><dl class="form-block clearfix">
		<dt><span class="asterisk">*</span>密码</dt>
		<dd>
			<input type="password" class="hidePwd" style="display:none;">
			<input class="form-control" id="pwd"   placeholder="请输入6位数字的交易密码" type="password" name="password" maxlength="6">
		</dd>
		<dt><span class="asterisk">*</span>确认密码</dt>
		<dd>
			<input class="form-control" name="sure_pwd" placeholder="请再次输入相同的密码"  type="password" maxlength="6">
		</dd>
		<dt><span class="asterisk">*</span>手机验证码</dt>
		<dd>
			<input type="hidden" value="{$username}" id="username" name="username">
			<button type="button" data-act="getSMS" class="get-code active" data-active="true">获取验证码</button>
			<input class="form-control pull-left" name="vcode"  placeholder=""  type="text">
		</dd>
	</dl></form>
</script>

<!-- pagescript -->
<script type="text/javascript">
	seajs.use(["account","fund"],function (account){
		account.operate("{$userInfo[payway]}");//充值传银行类型的参数

	});
</script>
</body>
</html>
